rend
rend provides cross-platform, endian-aware primitives for Rust.
Documentation
- rend, provides cross-platform, endian-aware primitives for Rust
Example
use transmute;
use *;
let little_int = from_native;
// Internal representation is little-endian
assert_eq!;
// Can also be made with `.into()`
let little_int: i32_le = 0x12345678.into;
// Still formats correctly
assert_eq!;
assert_eq!;
let big_int = from_native;
// Internal representation is big-endian
assert_eq!;
// Can also be made with `.into()`
let big_int: i32_be = 0x12345678.into;
// Still formats correctly
assert_eq!;
assert_eq!;